package com.bbs.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bbs.dto.MyPageResult;
import com.bbs.dto.PostPageQueryDTO;
import com.bbs.entity.Post;
import com.bbs.vo.PostVO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface PostMapper extends BaseMapper<Post> {
//创建点赞时的接口
    @Update("update post set like_num=like_num+1 where id=#{postId}")
    public void addOneLike(Long postId);

    Page<Post> queryPage(PostPageQueryDTO postPageQueryDTO);
}